<?php
namespace Home\Controller;
use Think\Controller;
/*后台公共类*/
class CommonController extends Controller {

    // tp提供的内置构造函数
    function _initialize(){

        // 获取自定义导航数据
        $mid_nav = D('nav')->where('pid=0 and is_home=1 and point=2')->select();  //查询中间导航

        $this->assign('mid_nav',$mid_nav);


        $not_table = array('index');
        if(!in_array(strtolower(CONTROLLER_NAME),$not_table)){
            // 动态实例化类对象
            $this->Model = D(CONTROLLER_NAME);
        }




    }
}